Skip to content

add ITs for policy entry references (eclipse-ditto/ditto#2423)#1

Closed
thjaeckle wants to merge 1 commit intomainfrom
feature/simplify-policy-import-references
Closed

add ITs for policy entry references (eclipse-ditto/ditto#2423)#1
thjaeckle wants to merge 1 commit intomainfrom
feature/simplify-policy-import-references

Conversation

@thjaeckle
Copy link
Copy Markdown
Member

@thjaeckle thjaeckle commented Apr 22, 2026

Summary

  • Replace entriesAdditions and importsAliases integration tests with new policy entry references tests, aligning with eclipse-ditto/ditto#2424
  • Add 4 new test classes covering CRUD, import references, local references, and combined reference scenarios (53 tests)
  • Adapt 3 existing test classes (transitive imports, importable sub-resources, search) to use import references instead of entriesAdditions
  • Delete 8 obsolete test files for removed entriesAdditions/importsAliases concepts

New test classes

Class Tests Scope
PolicyEntryReferencesIT 18 CRUD on /entries/{label}/references + referential integrity
PolicyEntryImportReferencesIT 19 Import ref behavior: thing access, template propagation
PolicyEntryLocalReferencesIT 9 Local ref behavior: subject fan-out, dynamic add/remove
PolicyEntryCombinedReferencesIT 7 Import + local refs combined, chaining, transitive

Replace entriesAdditions and importsAliases integration tests with
new policy entry references tests, covering import references
(inheriting resources from imported entries), local references
(inheriting subjects from local entries), combined references,
and referential integrity validation (409 on delete conflicts,
400 on broken references).

New test classes:
- PolicyEntryReferencesIT: CRUD + referential integrity (18 tests)
- PolicyEntryImportReferencesIT: import reference behavior (19 tests)
- PolicyEntryLocalReferencesIT: local reference behavior (9 tests)
- PolicyEntryCombinedReferencesIT: import + local combined (7 tests)

Adapted existing tests:
- PolicyImportTransitiveImportsIT: use import references in setup
- PolicyEntryImportableSubResourcesIT: use import references in setup
- SearchWithTransitiveImportsIT: use import references in setup

Deleted 8 obsolete test files for entriesAdditions/importsAliases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
@thjaeckle thjaeckle closed this Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant